import Layout from "@/layout";
import levels from "@/views/levels";

const commodityRouter = {
  path: "/commodity/list",
  component: Layout,
  redirect: "noRedirect",
  name: "commodity",
  alwaysShow: true,
  hidden: false,
  meta: {
    title: "商品管理",
    abbre: "商品",
    icon: "left_menu_commodity",
    navigation: "/commodity",
    id: "407"
  },
  children: [
    {
      path: "/commodity/list",
      component: () => import("@/views/commodity/commodityList"),
      name: "commodity_list",
      hidden: false,
      meta: {
        title: "商品列表",
        noCache: false,
        navigation: "/commodity/list",
        icon: "menu_big_data"
      }
    },
    {
      path: "/commodity/cloud",
      component: () => import("@/views/commodity/commodityCloud"),
      name: "commodity_cloud",
      hidden: false,
      meta: {
        title: "商品图片",
        noCache: false,
        navigation: "/commodity/cloud",
        icon: "menu_big_data"
      }
    },
    {
      path: "/commodity/cloud/library",
      component: () => import("@/views/commodity/commodityCloud_library"),
      name: "commodity_cloud_library",
      hidden: true,
      meta: {
        title: "商品图片库",
        noCache: false,
        navigation: "/commodity/cloud/library",
        icon: "menu_big_data"
      }
    },
    {
      path: "/commodity/cloud/pic",
      component: () => import("@/views/commodity/commodityCloud_pic"),
      name: "commodity_cloud_pic",
      hidden: true,
      meta: {
        title: "导入图片",
        noCache: false,
        navigation: "/commodity/cloud/pic",
        icon: "menu_big_data"
      }
    },
    {
      path: "/commodity/list/add",
      component: () => import("@/views/commodity/commodityList_add"),
      name: "commodity_list_add",
      hidden: true,
      meta: {
        title: "新增商品",
        bread: "商品列表,新增商品",
        noCache: true,
        navigation: "/commodity/list",
        icon: "menu_big_data"
      }
    },
    {
      path: "/commodity/list/edit/:id",
      component: () => import("@/views/commodity/commodityList_edit"),
      name: "commodity_list_edit",
      hidden: true,
      meta: {
        title: "编辑商品",
        bread: "商品列表,编辑商品",
        noCache: true,
        navigation: "/commodity/list",
        icon: "menu_big_data"
      }
    },
    {
      path: "/commodity/pricing",
      component: () => import("@/views/commodity/commodityPricing"),
      name: "commodity_pricing",
      hidden: false,
      meta: {
        title: "SKU维护",
        noCache: false,
        navigation: "/commodity/pricing",
        icon: "menu_big_data"
      }
    },
    // {
    //   path: "/commodity/group",
    //   component: () => import("@/views/commodity/commodityGroup"),
    //   name: "commodity_group",
    //   hidden: false,
    //   meta: {
    //     title: "分组报价",
    //     noCache: false,
    //     navigation: "/commodity/group",
    //     icon: "menu_big_data"
    //   }
    // },
    {
      path: "/commodity/group/goods",
      name: "commodity_group_new",
      hidden: false,
      component: levels,
      meta: {
        title: "分组报价",
        noCache: false,
        navigation: "/commodity/group/goods",
        icon: "menu_big_data"
      },
      children: [
        {
          path: "/commodity/group/goods",
          component: () => import("@/views/commodity/commodityGroup_goods.vue"),
          name: "commodity_group_new_goods",
          hidden: true,
          meta: {
            title: "商品报价",
            noCache: true,
            navigation: "/commodity/group/goods",
            icon: "menu_big_data"
          }
        },
        {
          path: "/commodity/group/category",
          component: () =>
            import("@/views/commodity/commodityGroup_category.vue"),
          name: "commodity_group_new_category",
          hidden: true,
          meta: {
            title: "分类报价",
            noCache: true,
            navigation: "/commodity/group/goods",
            icon: "menu_big_data"
          }
        }
      ]
    },
    {
      path: "/commodity/pricing/edit/:id",
      component: () => import("@/views/commodity/commodityPricing_edit"),
      name: "commodity_pricing_edit",
      hidden: true,
      meta: {
        title: "SKU编辑",
        bread: "SKU维护,SKU编辑",
        noCache: true,
        navigation: "/commodity/pricing",
        icon: "menu_big_data"
      }
    },
    {
      path: "/commodity/pricing/userDiscounts/:id",
      component: () => import("@/views/commodity/commodityuserDiscounts"),
      name: "commodity_userDiscounts",
      hidden: true,
      meta: {
        title: "用户专属折扣",
        bread: "SKU维护,SKU编辑,用户专属折扣",
        noCache: true,
        navigation: "/commodity/pricing",
        icon: "menu_big_data"
      }
    },
    {
      path: "/commodity/pricing/record",
      component: () => import("@/views/commodity/commodityPricing_record"),
      name: "commodity_pricing_record",
      hidden: true,
      meta: {
        title: "操作记录",
        bread: "SKU维护,操作记录",
        noCache: true,
        navigation: "/commodity/pricing",
        icon: "menu_big_data"
      }
    },
    {
      path: "/commodity/group/record",
      component: () => import("@/views/commodity/commodityGroup_record"),
      name: "commodity_group_record",
      hidden: true,
      meta: {
        title: "操作记录",
        bread: "分组报价,操作记录",
        noCache: true,
        navigation: "/commodity/group/goods",
        icon: "menu_big_data"
      }
    },
    {
      path: "/commodity/classification",
      component: () => import("@/views/commodity/commodityClassification"),
      name: "commodity_classification",
      hidden: false,
      meta: {
        title: "商品分类",
        noCache: true,
        navigation: "/commodity/classification",
        icon: "menu_big_data"
      }
    },
    {
      path: "/commodity/classification/import",
      component: () =>
        import("@/views/commodity/commodityClassificationImport"),
      name: "commodity_classification_import",
      hidden: true,
      meta: {
        title: "导入分类",
        bread: "商品分类,导入分类",
        noCache: true,
        navigation: "/commodity/classification",
        icon: "menu_big_data"
      }
    },
    {
      path: "/commodity/supporting",
      component: () => import("@/views/commodity/commoditySupporting"),
      name: "commodity_supporting",
      hidden: false,
      meta: {
        title: "辅助资料",
        noCache: true,
        navigation: "/commodity/supporting",
        icon: "menu_big_data"
      }
    },
    {
      path: "/commodity/supporting/import",
      component: () => import("@/views/commodity/commoditySupportingImport"),
      name: "commodity_supporting_import",
      hidden: true,
      meta: {
        title: "导入辅助资料",
        bread: "辅助资料,导入辅助资料",
        noCache: true,
        navigation: "/commodity/supporting",
        icon: "menu_big_data"
      }
    },
    {
      path: "/commodity/gallery",
      component: () => import("@/views/commodity/commodityGallery"),
      name: "commodity_gallery",
      hidden: false,
      meta: {
        title: "云商品库",
        noCache: false,
        navigation: "/commodity/gallery",
        icon: "menu_big_data"
      }
    },
    {
      path: "/commodity/gallery/see/:type/:id",
      component: () => import("@/views/commodity/commodityGallery_see"),
      name: "commodity_gallery_see",
      hidden: true,
      meta: {
        title: "云商品库详情",
        bread: "云商品库,云商品库详情",
        noCache: true,
        navigation: "/commodity/gallery",
        icon: "menu_big_data"
      }
    }
  ]
};

export default commodityRouter;
